package com.gency.subscribe;

import javax.servlet.MultipartConfigElement;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
@MapperScan("com.gency.subscribe.dao")
@SpringBootApplication
@ComponentScan("com.gency.subscribe.*")
public class OpenStageAdminApplication {

	public static void main(String[] args) {
		SpringApplication.run(OpenStageAdminApplication.class, args);
	}
	
	  @Bean  
	    public MultipartConfigElement multipartConfigElement() {  
	        MultipartConfigFactory factory = new MultipartConfigFactory();  
	        //文件最大  
	        factory.setMaxFileSize("10240KB"); //KB,MB  
	        /// 设置总上传数据总大小  
	        factory.setMaxRequestSize("102400KB");  
	        return factory.createMultipartConfig();  
	    }  
}
